package com.shierke.Ume.ui.activity.me

import android.content.Context
import android.os.Bundle
import com.library.flowlayout.FlowLayoutManager
import com.library.flowlayout.SpaceItemDecoration
import com.shierke.Ume.R
import com.shierke.Ume.base.BaseNoTitleActivity
import com.shierke.Ume.ui.adapter.me.LocationSearchHistoryAdapter
import com.shierke.Ume.util.click
import com.shierke.Ume.util.startActivity
import kotlinx.android.synthetic.main.activity_search_location.*
import net.lucode.hackware.magicindicator.buildins.UIUtil

/**
 * Create by Ybx
 * on 2020-10-27
 * Desribe:
 */
class SearchLocationActivity : BaseNoTitleActivity() {


    companion object {
        fun startActivity(context: Context) {
            context.startActivity<SearchLocationActivity>()
        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContentView(R.layout.activity_search_location)

        hitstoryRecycle.layoutManager =  FlowLayoutManager()


        hitstoryRecycle.addItemDecoration(SpaceItemDecoration(UIUtil.dip2px(this, 8.0)))

        val locationSearchHistoryAdapter = LocationSearchHistoryAdapter()

        hitstoryRecycle.adapter = locationSearchHistoryAdapter


        imageFind.click { SearchLocationResultActivity.startActivity(this) }
    }


}